//
//  ViewController.m
//  tttttt
//
//  Created by 李鹏飞 on 2018/5/9.
//  Copyright © 2018年 AFlyLi. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController


/// 方法
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    NSArray *strArr = @[@"R",@"R",];
    int n = 0;
    int m = 0;
    for (int i = 0; i < strArr.count; i++){
        NSString *temp1 = strArr[i];
        if (i == strArr.count - 1) {
            
        }else{
             NSString *temp2 = strArr[i + 1];
            if (temp1 == temp2){
                m = n + 1;
                NSLog(@"%d",++n);
            }
        }
       
    }
    NSLog(@"----%d",(m-1)/2 + 1);
    
    NSString *str = @"hi";
    NSString *str2 = [str substringFromIndex:3];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
